package com.sfdk.admin.data.spritesheetEditor
{
	import com.sfdk.data.api.IImageData;
import com.sfdk.data.api.ITreeDataProvider;
import com.sfdk.io.GenericIO;
	
	import flash.display.BitmapData;

	public class Spritesheet extends GenericIO implements IImageData, ITreeDataProvider
	{
		
		public function Spritesheet(currentDirectory : String, filePath : String = null)
		{
			_fullName = filePath;
			var pathArray : Array = filePath.split("/");
			_type = pathArray[pathArray.length - 2];
			_rootType = pathArray[1];
			_name = pathArray[pathArray.length - 1];
			super(currentDirectory+filePath, GenericIO.BITMAP_FILE);
		}
		
		private var _fullName:String;
		private var _name:String;
		private var _type:String;
		private var _rootType:String;
		
		public function get fullName():String
		{
			return _fullName;
		}
		
		public function set fullName(value:String):void
		{
			_fullName = value;
		}
		
		public function get label():String
		{
			return _name;
		}
		
		public function set label(value:String):void
		{
			_name = value;
		}
		
		public function get type():String
		{
			return _type;
		}
		
		public function get rootType():String
		{
			return _rootType;
		}


        public function get isImage():Boolean {
            return true;
        }

        public function get imageData():BitmapData
		{
			return _imageData;
		}
		
		[Bindable]
		public function set imageData(value:BitmapData):void
		{
			_imageData = value;
		}
	}
	
	
}